package com.example;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import org.springframework.web.WebApplicationInitializer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2024-02-28
 * Time: 13:08
 */
public class Main implements WebApplicationInitializer {



    /**
     * 当 web 项目启动时，就会自动调用该接口
     * SpringMVCInit 中的三个方法底层也是这个，在项目启动时初始化 ioc，配置，拦截器等
     */
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        System.out.println("Web 项目启动！");
    }
}
